<template>
  <div>
    <el-container>
      <el-header>
        <!--顶部导航栏-->
        <nav-menu></nav-menu>
      </el-header>
      <el-container>
        <el-aside>
          <!--侧边导航栏-->
          <side-menu @showHead="showHead"></side-menu>
        </el-aside>
        <el-main>
          <top-bar :message="message"></top-bar>
          <!--主界面-->
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
<!--    <router-view/>-->
  </div>
</template>

<script>
import NavMenu from './home/NavMenu'
import SideMenu from './home/SideMenu'
import TopBar from './home/TopBar'
export default {
  name: 'Home',
  components: {TopBar, SideMenu, NavMenu},
  updated () {
    this.message = this.header[this.$route.path]
  },
  data () {
    return {
      message: '',
      header: {
        '/index': '首页',
        '/case/info': '病历信息',
        '/case/input': '病历导入',
        '/case/textGraph': '文本图谱',
        '/case/graphicGraph': '图文图谱',
        '/case/patientImg': '患者图像',
        '/case/statistics': '病例统计',
        '/case/treatment': '治疗方案',
        '/case/similar': '相似病历',
        '/case/wordCloud': '词云统计'
      }
    }
  },
  methods: {
    showHead (data) {
      this.message = data
    }
  }
}
</script>

<style scoped>
header {
  height: 70px !important;
}
.el-header, .el-footer {
  background-color: #B3C0D1;
  color: #333;
  text-align: center;
  line-height: 60px;
  padding: 0;
}

.el-aside {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  line-height: 200px;
  overflow: hidden;
  width: 250px !important;
  /*height: 1000px;*/
  min-height: 100%;
}

.el-main {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  /*line-height: 160px;*/
  padding: 0;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
</style>
